﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Xml.Serialization;
using System.Configuration;

namespace TVT.UI.Menu
{
    public class Menu
    {
        List<Tab> tabs;

        public List<Tab> Tabs
        {
            get { return tabs; }
            set { tabs = value; }
        }

        private Menu()
        {

        }
        
        public static Menu Deserialize()
        {
            TextReader tr = new StreamReader(ConfigurationManager.AppSettings["MenuXMLPath"].ToString());
            XmlSerializer serializer = new XmlSerializer(typeof(Menu)); 

            Menu menu = (Menu)serializer.Deserialize(tr);
            tr.Close();         
            return menu;
        }        
    }
}
